﻿using GameFramework.Event;
using GameFramework;
using TowerDefence_Zombie.Data;

namespace TowerDefence_Zombie
{
    public class BuildTowerEventArgs : GameEventArgs
    {
        public static readonly int EventId = typeof(BuildTowerEventArgs).GetHashCode();

        public int TowerId
        {
            get;
            private set;
        }

        public int TowerLevel
        {
            get;
            private set;
        }

        public BuildTowerEventArgs()
        {
            TowerId = 0;
            TowerLevel = 0;
        }

        public override int Id
        {
            get
            {
                return EventId;
            }
        }

        public static BuildTowerEventArgs Create(int towerId, int towerLevel)
        {
            BuildTowerEventArgs showPreviewTowerEventArgs = ReferencePool.Acquire<BuildTowerEventArgs>();
            showPreviewTowerEventArgs.TowerId = towerId;
            showPreviewTowerEventArgs.TowerLevel = towerLevel;
            return showPreviewTowerEventArgs;
        }

        public override void Clear()
        {
            TowerId = 0;
            TowerLevel = 0;
        }
    }
}

